<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<h2>Liste clients</h2>

<table border="1">
    <tr>
        <th>id</th>
        <th width="200">Nom</th>
        <th>Prénom</th>
        <td>Modifier</td>
        <td>Supprimer</td>
    </tr>

    <c:forEach var="client" items="${clients}">
        <tr>
            <td>${client.id}</td>
            <td>${client.nom}</td>
            <td>${client.prenom}</td>
            <td>
                <s:url var="url" action="modifierClientForm">
                    <s:param name="idClient">${client.id}</s:param>
                </s:url>
                <s:a href="%{url}">Modifier</s:a>
            </td>
            <td>
                <s:url var="url" action="supprimerClient">
                    <s:param name="idClient">${client.id}</s:param>
                </s:url>
                <s:a href="%{url}">Supprimer</s:a>
            </td>
        </tr>
    </c:forEach>
</table>